<?php
/* @var $this BlockController */
/* @var $model Block */
/* @var $form BootActiveForm */
?>

<div class="form">

    <?php $form=$this->beginWidget('bootstrap.widgets.BootActiveForm', array(
            'id'=>'block-form',
            'enableAjaxValidation'=>false,
            'type'=>'horizontal',
            'method'=>'post',
)); ?>

    <fieldset>
        <legend>Alap adatok</legend>

        <div class="">

            <?php echo $form->textFieldRow($model,'name',array('size'=>60,'maxlength'=>255, 'class'=>'span3')); ?>

            <?php echo $form->textFieldRow($model,'code',array('size'=>60,'maxlength'=>255, 'class'=>'span3')); ?>

            <?php

            if(checkAccess('admin')){
                echo $form->dropDownListRow($model, 'user_id', CHtml::listData(User::model()->active()->findAll(), 'id', 'username'), array('class'=>'span3'));
             }

             ?>

        </div>

    </fieldset>

    <fieldset>
        <legend>Cím</legend>

        <div class="">
            <?php

            echo $form->textFieldRow($address, 'zip', array('class'=>'span3'));

            echo $form->textFieldRow($address, 'city', array('class'=>'span3'));

            echo $form->textFieldRow($address, 'address', array('class'=>'span3'));

            ?>
        </div>


    </fieldset>

    <hr />
    <div class="row-fluid controls">
        <?php $this->widget('bootstrap.widgets.BootButton', array(
                'buttonType'=>'submit',
                'type'=>'primary',
                'icon'=>'ok white',
                'label'=>'Mentés',
		    ));

        echo hyperlink('Vissza', array('block/index'), array('class'=>''));
        ?>
        </div>

    <?php $this->endWidget(); ?>

</div>
<!-- form -->
